package com.lida.study;

import com.lida.study.common.utils.sudo.SudoUtils;
import com.lida.study.sudo.Sudo;
import com.lida.study.sudo.SudoRun;
import org.opencv.core.Core;

/**
 * 测试类
 * @author lD
 * @date 2019/7/313:45
 */
@SuppressWarnings("all")
public class Main {

    public static long begin;

    static final double MINIMUM_DESKEW_THRESHOLD = 0.05d;


    static {
        // 引入opencv库
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
    }

    public static void main(String[] args) throws IllegalAccessException, InterruptedException {
        Sudo s = SudoUtils.asSudo(
                0,0,5,3,0,0,0,0,0
                ,8,0,0,0,0,0,0,2,0
                ,0,7,0,0,1,0,5,0,0
                ,4,0,0,0,0,5,3,0,0
                ,0,1,0,0,7,0,0,0,6
                ,0,0,3,2,0,0,0,8,0
                ,0,6,0,5,0,0,0,0,9
                ,0,0,4,0,0,0,0,3,0
                ,0,0,0,0,0,9,7,0,0
                );
//        String s = "005300000800000020070010500400005300010070006003200080060500009004000030000009700";//216
//        String s = "800000000003600000070090200050007000000045700000100030001000068008500010090000400";//1270
//        String s = "980700600700000080006050000400003000008900070000020300010000200007500060000001054";//760
//        String s = "980700600700000080006050000400003006009600050000020300010000204007800060000010000";//2377
//        String s = "980700600700000080006050000400003200008900070000070004030000100007600050000010002";//1400
//        String s = "980700600700000080006050000400030002008900060000005400010002000009500070000000301";//720
//        String s = "980700600500090070006004009400008007000300020000000100090007005004020000000100030";//350
//        String s = "980700600500090070007004000300000002008500060000006300010020007005800090000001000";//608
//        String s = "980700600500090070007004000300000200004800090000031000020000500005400080000005001";//1215
//        String s = "980700600500090070007004000300006000008500060000000302010000000005400080000021900";//150
//        String s= "700900001100005900000200080005020003000000648413000000007002090201060804080504012";//
//        String s= "..0....2.....E.8.9..0.1.F.265.7...3..5.8.4....F..6.4B.7....C.9......4....2..6....8..A.60.1...4.93.6F..9.5....0...4...2.1..3F..E.4..5.C..3..B.A.0.2........E.8.B.7.F.2..5.0..1......6.E3...9....7A...9....7.0.F.B..1..F..4..A..0..7..1..A..58.2....5...2..3..7.D.";//
        begin = System.currentTimeMillis();
        // 识别图片中的数独
        // Sudo sudo = OpenCvUtils.openCvDeal("d:/tmp/1.jpg");
        // 创建数独工作类实例
        SudoRun sudoRun = new SudoRun();
        // 设置线程池空闲时关闭
        sudoRun.setThreadPoolShutdown(true);
        sudoRun.run(s);
    }
}
